package com.xjscrm.console.web.sms;

import com.xjscrm.console.param.login.VerifyDto;
import com.xjscrm.console.service.common.sms.SmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "短信管理", tags = "短信管理")
@RestController
@RequestMapping(value = "/sms")
public class SmsController {

    @Autowired
    private SmsService smsService;

    @ApiOperation(value = "发送短信验证码")
    @PostMapping("/sendCode")
    public Object sendCode(@RequestBody VerifyDto verifyDto) {
        smsService.sendCode(verifyDto);
        return true;
    }

}
